package kr.hkit.powerjava.chapter12.poli;

public class ShapeTest {

	private static Shape arrayOfShapes[];

	public static void main(String[] args) {
		init();
		drawAll();
	}

	public static void drawAll() {
		for (int i = 0; i < arrayOfShapes.length; i++) {
			arrayOfShapes[i].draw();
		}
	}

	public static void init() {
		arrayOfShapes = new Shape[5];
		arrayOfShapes[0] = new Rectangle();
		arrayOfShapes[1] = new Triangle();
		arrayOfShapes[2] = new Circle();
		arrayOfShapes[3] = new Cylinder();
		arrayOfShapes[4] = new Shape();
	}

}
